<template>
	<view class="">
		<cu-custom :bgcolor="'#fff'" />
		<scroll-view scroll-y="true" :style="'height:'+scorllHeight+ 'px;'">
			<uni-forms :modelValue="formData" label-position="top" :rules="rules" ref="form">
				<view class="pdf-box p-2">
					<view class="pl-2 pr-2">
						<uni-forms-item required label="店铺名称" name="supplier_name" label-width="120">
							<uni-easyinput type="text" v-model="formData.supplier_name" placeholder="请输入店铺名称" />
						</uni-forms-item>
						<uni-forms-item label="店铺头像" name="name" label-width="120">
							<uploadImage style="width: 280rpx; height: 280rpx;" :limit="1" :imageValue="shopImg"
								@imgurl="getShopImg" />
						</uni-forms-item>
					</view>
					<view class="upload-box p-2">
						<uni-forms-item label="店铺公告" name="notice" label-width="120">
							<uni-easyinput type="text" v-model="formData.notice" placeholder="请输入店铺公告" />
						</uni-forms-item>
						<uni-forms-item name="supplier_street" label="店铺分类" label-width="120">
							<uni-data-select v-model="formData.supplier_street" :localdata="supplierStreet"
								@change="change"></uni-data-select>
						</uni-forms-item>
						<!-- <uni-forms-item label="开户行城市" label-width="120">
							<view class="d-flex flex-row j-sb flex-wrap">
								<uni-data-select class="span-20" v-model="formData.pro" :localdata="proList"
									@change="changePro" placeholder="选择省份"></uni-data-select>
								<uni-data-select class="span-9" v-model="formData.city" :localdata="cityList"
									@change="changeCity" placeholder="选择城市"></uni-data-select>
								<uni-data-select class="span-9" v-model="formData.area" :localdata="areaList"
									placeholder="选择区县"></uni-data-select>
							</view>

						</uni-forms-item> -->


						<!-- <uni-forms-item label="开户行关键字" label-width="120">
							<uni-easyinput type="text" v-model="formData.name_opening_bank_branch"
								placeholder="请输入开户行关键字" />
						</uni-forms-item> -->
						<uni-forms-item label="开户行支行名" label-width="120">
							<!-- <uni-data-select v-model="formData.bank_no" :localdata="bankNameList"></uni-data-select> -->
							<uni-easyinput type="text" v-model="formData.bank_no" placeholder="请输入开户行支行名" />
						</uni-forms-item>
						<uni-forms-item label="注册地址" label-width="120">
							<uni-easyinput type="text" v-model="formData.registered_address" placeholder="请输入注册地址" />
						</uni-forms-item>
						<uni-forms-item label="营业执照号" label-width="120">
							<uni-easyinput type="text" v-model="formData.business_licence_number"
								placeholder="请输入营业执照号" />
						</uni-forms-item>
						<uni-forms-item required label="营业执照开始日期" name="bankUserName" label-width="120">
							<uni-datetime-picker type="date" :clear-icon="false"
								v-model="formData.business_license_start_time" />
						</uni-forms-item>
						<uni-forms-item required name="idCard" label="营业执照结束日期" label-width="120"
							class="position-relative">
							<uni-datetime-picker type="date" :clear-icon="false"
								v-model="formData.business_license_end_time" :disabled="formData.only == 1" />
							<uni-data-checkbox class="position-absolute" style="right: 0;top: 15rpx;"
								v-model="formData.only" :localdata="hobby" @change="changeOnly"></uni-data-checkbox>
						</uni-forms-item>
						<uni-forms-item label="账户类型" label-width="120">
							<uni-data-select v-model="formData.account_number_type"
								:localdata="accountNumberType"></uni-data-select>
						</uni-forms-item>
						<!-- <uni-forms-item v-if="formData.account_number_type == 2" label="开户许可证" name="name"
							label-width="120">
							<uploadImage :limit="1" :imageValue="aoppn" class="flex-1" @imgurl="getShopImgaoppn" />
						</uni-forms-item> -->
						<uni-forms-item label="营业地址路名" label-width="120">
							<uni-easyinput type="text" v-model="formData.business_address_road"
								placeholder="请输入营业地址路名" />
						</uni-forms-item>
						<uni-forms-item label="营业地址门牌" label-width="120">
							<uni-easyinput type="text" v-model="formData.business_address" placeholder="请输入地址门牌" />
						</uni-forms-item>
						<uni-forms-item label="营业地址补充信息" label-width="120">
							<uni-easyinput type="text" v-model="formData.business_address_detail"
								placeholder="请输入营业地址补充信息" />
						</uni-forms-item>
						<uni-forms-item label="法人证件开始日期" name="bankUserName" label-width="120">
							<uni-datetime-picker type="date" :clear-icon="false"
								v-model="formData.legal_person_certificate_start_time" />
						</uni-forms-item>
						<uni-forms-item label="法人证件结束日期" label-width="120" class="position-relative">
							<uni-datetime-picker type="date" :clear-icon="false" :disabled="formData.legal_only == 1"
								v-model="formData.legal_person_certificate_end_time" />
							<uni-data-checkbox class="position-absolute" style="right: 0;top: 15rpx;"
								v-model="formData.legal_only" :localdata="hobbys"
								@change="changeLegalOnly"></uni-data-checkbox>
						</uni-forms-item>


						<uni-forms-item label="行业类别编码" label-width="120">
							<!-- <uni-easyinput type="number" v-model="formData.industry_category_code"
								placeholder="请输入行业类别编码" /> -->
							<uni-data-picker placeholder="请选择班级" popup-title="请选择所在地区" :localdata="sellCcList"
								v-model="formData.industry_category_code">
							</uni-data-picker>

						</uni-forms-item>

						<uni-forms-item label="店铺标签" label-width="120">
							<uni-easyinput type="textarea" v-model="formData.shop_label" placeholder="请输入店铺标签" />
						</uni-forms-item>
						<uni-forms-item label="店铺电话" label-width="120">
							<uni-easyinput type="text" v-model="formData.contacts_phone" placeholder="请输入店铺电话" />
						</uni-forms-item>
						<uni-forms-item label="详细地址" label-width="120">
							<uni-easyinput type="textarea" v-model="formData.address" :maxlength="100"
								placeholder="请输入详细地址" @blur="handleBlur" />
						</uni-forms-item>
						<uni-forms-item label="开店时间" label-width="120">
							<!-- <text class="text-danger font-sm">例子:15.30,即为15:30,小时范围0-23,分钟范围0-59</text> -->
							<!-- <uni-easyinput type="text" v-model="formData.jtime" placeholder="请输入开店时间" /> -->
							<uni-data-select v-model="formData.jtime" :localdata="jtimeList"></uni-data-select>
						</uni-forms-item>
						<uni-forms-item label="关店时间" label-width="120">
							<!-- <text class="text-danger font-sm">例子:15.30,即为15:30,小时范围0-23,分钟范围0-59</text> -->
							<!-- <uni-easyinput type="text" v-model="formData.ktime" placeholder="请输入关店时间" /> -->
							<uni-data-select v-model="formData.ktime" :localdata="ktimeList"></uni-data-select>
						</uni-forms-item>
						<!-- <uni-forms-item label="起送价格" label-width="120">
							<uni-easyinput type="text" v-model="formData.manqi" placeholder="请填写正确银行卡号" />
						</uni-forms-item> -->
						<uni-forms-item label="营业状态" label-width="120">
							<uni-data-select v-model="formData.xiuxi" :localdata="xiuxiList"></uni-data-select>
						</uni-forms-item>

						<uni-forms-item label="接单状态" label-width="120">
							<uni-data-select v-model="formData.zidong" :localdata="zidongList"></uni-data-select>
						</uni-forms-item>
						<uni-forms-item label="门店图片" label-width="120">
							<view class="d-flex flex-row flex-wrap">
								<uploadImage :limit="1" :imageValue="shopImgOne" class="flex-1"
									@imgurl="getShopImgOne" />
								<uploadImage :limit="1" :imageValue="shopImgTwo" class="flex-1"
									@imgurl="getShopImgTow" />
								<uploadImage :limit="1" :imageValue="shopImgThree" class="flex-1"
									@imgurl="getShopImgThree" />
								<uploadImage :limit="1" :imageValue="shopImgFour" class="flex-1"
									@imgurl="getShopImgFour" />
								<uploadImage :limit="1" :imageValue="shopImgFive" class="flex-1"
									@imgurl="getShopImgFive" />
								<uploadImage :limit="1" :imageValue="shopImgSix" class="flex-1"
									@imgurl="getShopImgSix" />
							</view>

						</uni-forms-item>
						<!-- <uni-forms-item label="配送方式" label-width="120">
							<uni-data-select v-model="formData.ps_type" :localdata="psTypeList"></uni-data-select>
						</uni-forms-item> -->

					</view>
					<view class="button-box p-2 mb-5">
						<button class="main-bg-color text-white font-md" @click="submit">保存</button>
					</view>

				</view>
			</uni-forms>

		</scroll-view>
	</view>
</template>

<script>
	import title from "@/components/common/title.vue"
	import validate from "@/utils/validate.js"
	import util from "@/utils/util.js"
	import uploadImage from "@/components/common/uploadImage.vue"
	import cuCustom from '@/components/common/custom.vue'
	import interceptor from "@/utils/request.js"
	export default {
		components: {
			title,
			uploadImage,
			cuCustom
		},
		data() {
			return {
				active: 1,
				scorllHeight: 500,
				imageValue: [],
				formData: {
					supplier_name: "",
					notice: "",
					supplier_street: "",
					pro: "",
					city: "",
					area: "",
					bank_no: "",
					name_opening_bank_branch: "",
					registered_address: "",
					business_licence_number: "",
					business_license_start_time: "",
					business_license_end_time: "",
					only: "",
					account_number_type: "",
					business_address_road: "",
					business_address: "",
					business_address_detail: "",
					legal_person_certificate_start_time: "",
					legal_person_certificate_end_time: "",
					legal_only: "",
					industry_category_code: "",
					account_opening_permit_photo_name: "",
					shop_label: "",
					contacts_phone: "",
					address: "",
					jtime: "",
					ktime: "",
					manqi: "",
					xiuxi: "",
					zidong: "",
					supplier_shop_oss_id: [],
					ps_type: "1",
					shop_logo: ""
				},
				rules: {
					// 对name字段进行必填验证
					supplier_name: {
						rules: [{
							required: true,
							errorMessage: '请输入店铺名称',
						}]
					},

				},
				currnt: 0,
				bankNameList: [],
				shopImg: [{
					url: ""
				}],
				shopImgOne: [{
					url: ""
				}],
				shopImgTwo: [{
					url: ""
				}],
				shopImgThree: [{
					url: ""
				}],
				shopImgFour: [{
					url: ""
				}],
				shopImgFive: [{
					url: ""
				}],
				shopImgSix: [{
					url: ""
				}],
				supplierStreet: [],
				proList: [],
				cityList: [],
				areaList: [],
				hobby: [{
					text: '永久',
					value: "1"
				}, {
					text: '默认',
					value: ""
				}],
				hobbys: [{
						text: '永久',
						value: "1"
					},
					{
						text: '默认',
						value: ""
					}
				],
				accountNumberType: [{
						text: '个人商户',
						value: "1"
					},
					{
						text: '企业商户',
						value: "2"
					}
				],
				xiuxiList: [{
						text: '休息',
						value: "0"
					},
					{
						text: '营业',
						value: "1"
					}
				],
				zidongList: [{
						text: '手动',
						value: "0"
					},
					{
						text: '自动',
						value: "1"
					}
				],
				psTypeList: [
					// {
					// 	text: '商家自配送',
					// 	value: 0
					// },
					{
						text: '平台配送',
						value: "1"
					}
				],
				aoppn: [],
				shopImgOneCopy: "",
				shopImgTwoCopy: "",
				shopImgThreeCopy: "",
				shopImgFourCopy: "",
				shopImgFiveCopy: "",
				shopImgSixCopy: "",
				jtimeList: [{
						text: '00.00',
						value: '00.00'
					},
					{
						text: '00.30',
						value: '00.30'
					},
					{
						text: '1.00',
						value: '1.00'
					},
					{
						text: '1.30',
						value: '1.30'
					},
					{
						text: '2.00',
						value: '2.00'
					},
					{
						text: '2.30',
						value: '2.30'
					},
					{
						text: '3.00',
						value: '3.00'
					},
					{
						text: '3.30',
						value: '3.30'
					},
					{
						text: '4.00',
						value: '4.00'
					},
					{
						text: '4.30',
						value: '4.30'
					},
					{
						text: '5.00',
						value: '5.00'
					},
					{
						text: '5.30',
						value: '5.30'
					},
					{
						text: '6.00',
						value: '6.00'
					},
					{
						text: '6.30',
						value: '6.30'
					},
					{
						text: '7.00',
						value: '7.00'
					},
					{
						text: '7.30',
						value: '7.30'
					},
					{
						text: '8.00',
						value: '8.00'
					},
					{
						text: '8.30',
						value: '8.30'
					},
					{
						text: '9.00',
						value: '9.00'
					},
					{
						text: '9.30',
						value: '9.30'
					},
					{
						text: '10.00',
						value: '10.00'
					},
					{
						text: '10.30',
						value: '10.30'
					},
					{
						text: '11.00',
						value: '11.00'
					},
					{
						text: '11.30',
						value: '11.30'
					},
					{
						text: '12.00',
						value: '12.00'
					},
					{
						text: '12.30',
						value: '12.30'
					},
					{
						text: '13.00',
						value: '13.00'
					},
					{
						text: '13.30',
						value: '13.30'
					},
					{
						text: '14.00',
						value: '14.00'
					},
					{
						text: '14.30',
						value: '14.30'
					},
					{
						text: '15.00',
						value: '15.00'
					},

					{
						text: '15.30',
						value: '15.30'
					},
					{
						text: '16.00',
						value: '16.00'
					},
					{
						text: '16.30',
						value: '16.30'
					},
					{
						text: '17.00',
						value: '17.00'
					},
					{
						text: '17.30',
						value: '17.30'
					},
					{
						text: '18.00',
						value: '18.00'
					},
					{
						text: '18.30',
						value: '18.30'
					},
					{
						text: '19.00',
						value: '19.00'
					},
					{
						text: '19.30',
						value: '19.30'
					},
					{
						text: '20.00',
						value: '20.00'
					},
					{
						text: '20.30',
						value: '20.30'
					},
					{
						text: '21.00',
						value: '21.00'
					},
					{
						text: '21.30',
						value: '21.30'
					},
					{
						text: '22.00',
						value: '22.00'
					},
					{
						text: '22.30',
						value: '22.30'
					},
					{
						text: '23.00',
						value: '23.00'
					},
					{
						text: '23.30',
						value: '23.30'
					}

				],
				ktimeList: [{
						text: '00.00',
						value: '00.00'
					},
					{
						text: '00.30',
						value: '00.30'
					},
					{
						text: '1.00',
						value: '1.00'
					},
					{
						text: '1.30',
						value: '1.30'
					},
					{
						text: '2.00',
						value: '2.00'
					},
					{
						text: '2.30',
						value: '2.30'
					},
					{
						text: '3.00',
						value: '3.00'
					},
					{
						text: '3.30',
						value: '3.30'
					},
					{
						text: '4.00',
						value: '4.00'
					},
					{
						text: '4.30',
						value: '4.30'
					},
					{
						text: '5.00',
						value: '5.00'
					},
					{
						text: '5.30',
						value: '5.30'
					},
					{
						text: '6.00',
						value: '6.00'
					},
					{
						text: '6.30',
						value: '6.30'
					},
					{
						text: '7.00',
						value: '7.00'
					},
					{
						text: '7.30',
						value: '7.30'
					},
					{
						text: '8.00',
						value: '8.00'
					},
					{
						text: '8.30',
						value: '8.30'
					},
					{
						text: '9.00',
						value: '9.00'
					},
					{
						text: '9.30',
						value: '9.30'
					},
					{
						text: '10.00',
						value: '10.00'
					},
					{
						text: '10.30',
						value: '10.30'
					},
					{
						text: '11.00',
						value: '11.00'
					},
					{
						text: '11.30',
						value: '11.30'
					},
					{
						text: '12.00',
						value: '12.00'
					},
					{
						text: '12.30',
						value: '12.30'
					},
					{
						text: '13.00',
						value: '13.00'
					},
					{
						text: '13.30',
						value: '13.30'
					},
					{
						text: '14.00',
						value: '14.00'
					},
					{
						text: '14.30',
						value: '14.30'
					},
					{
						text: '15.00',
						value: '15.00'
					},

					{
						text: '15.30',
						value: '15.30'
					},
					{
						text: '16.00',
						value: '16.00'
					},
					{
						text: '16.30',
						value: '16.30'
					},
					{
						text: '17.00',
						value: '17.00'
					},
					{
						text: '17.30',
						value: '17.30'
					},
					{
						text: '18.00',
						value: '18.00'
					},
					{
						text: '18.30',
						value: '18.30'
					},
					{
						text: '19.00',
						value: '19.00'
					},
					{
						text: '19.30',
						value: '19.30'
					},
					{
						text: '20.00',
						value: '20.00'
					},
					{
						text: '20.30',
						value: '20.30'
					},
					{
						text: '21.00',
						value: '21.00'
					},
					{
						text: '21.30',
						value: '21.30'
					},
					{
						text: '22.00',
						value: '22.00'
					},
					{
						text: '22.30',
						value: '22.30'
					},
					{
						text: '23.00',
						value: '23.00'
					},
					{
						text: '23.30',
						value: '23.30'
					},
					{
						text: '23.59',
						value: '23.59'
					}

				],
				sellCcList: []
			}
		},
		onLoad() {
			uni.getSystemInfo({
				success: (res => {
					this.scorllHeight = res.windowHeight - uni.upx2px(20)
				})
			})
			// this.getShopClassList()
			this.getStoreBase()
		},
		onShow() {
			this.getSelMccCode()
		},
		methods: {
			handleBlur() {
				if (this.formData.address.length < 5) {
					// 输入内容长度小于5位时的处理逻辑
					uni.showToast({
						title: '补充地址的内容不能少于5位',
						icon: 'none'
					});
				}
			},
			changeOnly(e) {
				this.formData.only = e.detail.value[0]
				this.formData.business_license_end_time = e.detail.value[0] == 1 ? "9999-12-31" : ""
			},
			changeLegalOnly(e) {
				this.formData.legal_only = e.detail.value[0]

				this.formData.legal_person_certificate_end_time = e.detail.value[0] == 1 ? "9999-12-31" : ""
			},
			// 触发提交表单
			submit() {
				let _that = this
				_that.$refs.form.validate().then(res => {
					if (Date.parse(_that.formData.business_license_start_time) >= Date.parse(_that.formData
							.business_license_end_time)) {
						uni.showToast({
							title: "营业执照开始时间不能大于结束时间",
							icon: "none"
						})
						return false
					}
					_that.formData.supplier_shop_oss_id.push(_that.shopImgOneCopy)
					_that.formData.supplier_shop_oss_id.push(_that.shopImgTwoCopy)
					_that.formData.supplier_shop_oss_id.push(_that.shopImgThreeCopy)
					_that.formData.supplier_shop_oss_id.push(_that.shopImgFourCopy)
					_that.formData.supplier_shop_oss_id.push(_that.shopImgFiveCopy)
					_that.formData.supplier_shop_oss_id.push(_that.shopImgSixCopy)
					let params = Object.assign({}, {
						supplier_id: uni.getStorageSync("supplier_id"),
						type: 1
					}, _that.formData)
					interceptor.get("/supplier_applet_api.php?act=supplierConfig", params).then((res) => {
						if (res.status == 1) {
							uni.showToast({
								title: "更新成功",
								icon: "success",
								success() {
									// _that.getStoreBase()
									uni.navigateBack()
								}
							})
						} else {
							uni.showToast({
								title: res.msg,
								icon: "none"
							})
						}
					})
				}).catch(err => {
					console.log('表单错误信息：', err);
				})
			},
			checkIdCard(number) {
				let isIdcard = validate.isValidChineseID(number)
				if (!isIdcard) {
					uni.showToast({
						title: "身份证号码有误请检查",
						icon: 'none'
					})
				}
			},
			// 获取详情
			getStoreBase() {
				this.shopImg = []
				this.shopImgOne = []
				this.shopImgTwo = []
				this.shopImgThree = []
				this.shopImgFour = []
				this.shopImgFive = []
				this.shopImgSix = []
				this.shopImgOneCopy = ""
				this.shopImgTwoCopy = ""
				this.shopImgThreeCopy = ""
				this.shopImgFourCopy = ""
				this.shopImgFiveCopy = ""
				this.shopImgSixCopy = ""
				let params = {
					supplier_id: uni.getStorageSync("supplier_id"),
					type: 2
				}
				interceptor.get("/supplier_applet_api.php?act=supplierConfig", params).then((res) => {
					if (res.status == 1) {
						res.info.region.map((item) => {
							item.text = item.province
							item.value = item.province_code
						})
						this.proList = res.info.region
						res.info.supplier_street.map((item) => {
							item.text = item.str_name
							item.value = item.str_id
						})
						this.supplierStreet = res.info.supplier_street
						this.formData = Object.assign(this.formData, res.info.supplier)
						this.formData.pro = res.info.supplier.area.province_code
						this.getCityList(this.formData.pro)
						this.formData.city = res.info.supplier.area.city_code
						this.getAreaList(this.formData.city)
						this.formData.area = res.info.supplier.area.area_code

						this.formData.notice = res.info.shop_config.value
						this.formData.supplier_street = res.info.supplier.type_id
						this.formData.ps_type = res.info.supplier.ps_type


						this.formData.business_license_end_time = res.info.supplier.business_license_end_time ? res
							.info.supplier.business_license_end_time : ""
						this.formData.business_license_start_time = res.info.supplier.business_license_start_time ?
							res.info.supplier.business_license_start_time : ""
						this.formData.legal_person_certificate_end_time = res.info.supplier
							.legal_person_certificate_end_time ? res.info.supplier
							.legal_person_certificate_end_time : ""
						this.formData.legal_person_certificate_start_time = res.info.supplier
							.legal_person_certificate_start_time ? res.info.supplier
							.legal_person_certificate_start_time == "0000-00-00" ? "" : res.info.supplier
							.legal_person_certificate_start_time : ""
						this.formData.only = this.formData.business_license_end_time == "9999-12-31" ? "1" : "0"
						this.formData.legal_only = this.formData.legal_person_certificate_end_time ==
							"9999-12-31" ? "1" : "0"
						if (res.info.shop_logo.value) {
							this.formData.shop_logo = res.info.shop_logo.value
							this.shopImg.push({
								url: this.returnImg(res.info.shop_logo.value)
							})
						}
						if (res.info.supplier_shop_oss[0].img_path) {
							this.shopImgOne.push({
								url: this.returnImg(res.info.supplier_shop_oss[0].img_path)
							})
						}
						if (res.info.supplier_shop_oss[1].img_path) {
							this.shopImgTwo.push({
								url: this.returnImg(res.info.supplier_shop_oss[1].img_path)
							})
						}
						if (res.info.supplier_shop_oss[2].img_path) {
							this.shopImgThree.push({
								url: this.returnImg(res.info.supplier_shop_oss[2].img_path)
							})
						}
						if (res.info.supplier_shop_oss[3].img_path) {
							this.shopImgFour.push({
								url: this.returnImg(res.info.supplier_shop_oss[3].img_path)
							})
						}
						if (res.info.supplier_shop_oss[4].img_path) {
							this.shopImgFive.push({
								url: this.returnImg(res.info.supplier_shop_oss[4].img_path)
							})
						}
						if (res.info.supplier_shop_oss[5].img_path) {
							this.shopImgSix.push({
								url: this.returnImg(res.info.supplier_shop_oss[5].img_path)
							})
						}
						this.shopImgOneCopy = res.info.supplier_shop_oss[0].img_path
						this.shopImgTwoCopy = res.info.supplier_shop_oss[1].img_path
						this.shopImgThreeCopy = res.info.supplier_shop_oss[2].img_path
						this.shopImgFourCopy = res.info.supplier_shop_oss[3].img_path
						this.shopImgFiveCopy = res.info.supplier_shop_oss[4].img_path
						this.shopImgSixCopy = res.info.supplier_shop_oss[5].img_path
						this.formData = util.null2str(this.formData)
						this.$forceUpdate()
					} else {
						uni.showToast({
							title: res.msg,
							icon: "none"
						})
					}
				})
			},
			getShopImg(value) {
				this.shopImg = []
				this.formData.shop_logo = value
				if (value) {
					this.shopImg.push({
						url: this.returnImg(value)
					})
				}

			},
			getShopImgOne(value) {
				this.shopImgOne = []
				this.shopImgOneCopy = value
				if (value) {
					this.shopImgOne.push({
						url: this.returnImg(value)
					})
				}

			},
			getShopImgTow(value) {
				this.shopImgTwo = []
				this.shopImgTwoCopy = value
				if (value) {
					this.shopImgTwo.push({
						url: this.returnImg(value)
					})
				}

			},
			getShopImgThree(value) {
				this.shopImgThree = []
				this.shopImgThreeCopy = value
				if (value) {
					this.shopImgThree.push({
						url: this.returnImg(value)
					})
				}

			},
			getShopImgFour(value) {
				this.shopImgFour = []
				this.shopImgFourCopy = value
				if (value) {
					this.shopImgFour.push({
						url: this.returnImg(value)
					})
				}

			},
			getShopImgFive(value) {
				this.shopImgFive = []
				this.shopImgFiveCopy = value
				if (value) {
					this.shopImgFive.push({
						url: this.returnImg(value)
					})
				}

			},
			getShopImgSix(value) {
				this.shopImgSix = []
				this.shopImgSixCopy = value
				if (value) {
					this.shopImgSix.push({
						url: this.returnImg(value)
					})
				}

			},
			getShopImgaoppn(value) {
				this.aoppn = []
				this.formData.account_opening_permit_photo_name = value
				if (value) {
					this.aoppn.push({
						url: this.returnImg(value)
					})
				}

			},
			returnImg(img) {
				return `${getApp().globalData.baseUrl}/${img}`
			},
			changePro(e) {
				// 通过省份ID获取city信息
				console.log(e)
				this.getCityList(e)
			},
			getCityList(id) {
				let params = {
					pro: id,
					type: 1
				}
				interceptor.get('/supplier_applet_api.php?act=getAddress', params).then((res) => {
					res.info.map((item) => {
						item.text = item.city
						item.value = item.city_code
					})
					this.cityList = res.info
				})
			},
			changeCity(e) {
				// 通过城市ID获取区县信息
				this.getAreaList(e)
			},
			getAreaList(id) {
				let params = {
					pro: this.formData.pro,
					city: id,
					type: 2
				}
				interceptor.get('/supplier_applet_api.php?act=getAddress', params).then((res) => {
					res.info.map((item) => {
						item.text = item.area
						item.value = item.area_code
					})
					this.areaList = res.info
				})
			},
			getSelMccCode() {
				interceptor.get('/supplier_applet_api.php?act=selMccCode').then((res) => {
					this.sellCcList = res.info
				})
			}

		}
	}
</script>

<style lang="scss" scoped>
	.status-btn {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		align-items: center;
		justify-content: center;
		height: 92rpx;
		margin: 30rpx;
		background-color: #007AFF;
	}

	.example-body {
		/* #ifndef APP-NVUE */
		display: block;
		/* #endif */
		padding: 15px;
		flex-direction: row;
	}

	.button-box {
		// position: absolute;
		// bottom: 0;
		background: #F8F8F8;
		height: 100upx;
		width: 100%;
		box-sizing: border-box;
	}

	.radio {
		display: flex;
		flex-direction: row;
		align-items: center;

		checkbox {
			border-radius: 15rpx;
			/* 可以根据需要调整圆角的大小 */
		}
	}

	.uni-list-cell {
		justify-content: flex-start
	}

	.upload-box {
		width: 100%;
		height: auto;
		box-sizing: border-box;
	}

	::v-deep .uni-forms-item {
		.uni-forms-item__label {
			font-weight: 500;
			font-size: 30rpx;
			color: #393F4C;
		}

		.uni-easyinput__content {
			border: 0;
			border-radius: 0;
			background: transparent !important;
			border-bottom: 2px solid #E1E5ED !important;
		}

		.uni-select {
			border: 0;
			border-radius: 0;
			background: transparent !important;
			border-bottom: 2px solid #E1E5ED !important;
		}

		.uni-date-x--border {
			border: 0;
			border-radius: 0;
			background: transparent !important;
			border-bottom: 2px solid #E1E5ED !important;
		}

		.uni-date-x {
			background: transparent !important;
		}
	}

	.button-box {
		// position: absolute;
		// bottom: 0;
		background: #F8F8F8;
		height: 100upx;
		width: 100%;
		box-sizing: border-box;
	}
	::v-deep .input-value-border{
		border: 0;
		border-bottom: 2px solid #E1E5ED !important;
		border-radius: 0;
	}
</style>